import { createRouter, createWebHistory } from 'vue-router'
import Home from '../views/Home.vue'

const routes = [{
    path:"/",
    redirect:"/Login"
},
  {
    path: '/home',
    name: 'Home',
    component: Home,
    children:[
      {
        path: '/about',
        name: 'About',
        component: () => import(/* webpackChunkName: "about" */ '../views/About/About.vue')//二手房
      },{
        path: '/bridal',
        name: 'Bridal',
        component: () => import(/* webpackChunkName: "about" */ '../views/Bridal/Bridal.vue')//新房
      },{
        path: '/group',
        name: 'Group',
        component: () => import(/* webpackChunkName: "about" */ '../views/Group/Group.vue')//团购
      },{
        path: '/about',
        name: 'About',
        component: () => import(/* webpackChunkName: "about" */ '../views/Housing/Housing.vue')//出租房
      },{
        path: '/news',
        name: 'News',
        component: () => import(/* webpackChunkName: "about" */ '../views/News/News.vue')//消息
      },{
        path: '/purchase',
        name: 'Purchase',
        component: () => import(/* webpackChunkName: "about" */ '../views/Purchase/Purchase.vue')//求购
      },{
        path: '/ranking',
        name: 'Ranking',
        component: () => import(/* webpackChunkName: "about" */ '../views/Ranking/Ranking.vue')//  排行版
      },{
        path: '/real',
        name: 'Real',
        component: () => import(/* webpackChunkName: "about" */ '../views/Real/Real.vue')//楼市圈
      },{
        path: '/record',
        name: 'Record',
        component: () => import(/* webpackChunkName: "about" */ '../views/Record/Record.vue')//战绩
      },{
        path: '/streaming',
        name: 'Streaming',
        component: () => import(/* webpackChunkName: "about" */ '../views/Streaming/Streaming.vue')//直播
      },{
        path: '/strives',
        name: 'Strives',
        component: () => import(/* webpackChunkName: "about" */ '../views/Strives/Strives.vue')//求租
      }
    ]
  },{
    path: '/login',
    name: 'Login',
    component: () => import(/* webpackChunkName: "about" */ '../views/Login/Login.vue')//登录
  }
  
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
